falloutmodsfandomcom-20200214-history
Setting up for script compiling
by ColJack I'm not going to go into the details of scripting itself, this is just how to set up the compiler.. Watcom Setup The script compiler doesn't come with a C pre-processor. The original developers used a C pre-processor they already had on their PC's as it was easier than writing their own specifically for Fallout.. They used the pre-processor from Watcom C compiler. This is available from many places.. I'll leave you to find it.. ( I can't do everything for you. ) You can also use other C pre-processors, but since I only use the Watcom one, I'll stick to how that works for now.. I am using Watcom 11, not openWatcom, so there might be differences to setting up for open Watcom. I'm going to assume that the drive you have Fallout installed on is C:\... for any other drive, just change the drive letter in the following. Install Watcom to it's default directory ( C:\watcom ) Go to the scripts directory in the fallout 2 editor directory ( C:\Program Files\Black Isle\Fallout 2 Mapper\scripts by default.. ) and delete the p.bat file, and also delete it in all sub directories.. ( it's easier this way.. trust me.. ) copy the following into a blank notepad file and save it as p.bat. @echo off copy %1.ssl temp.c c:\watcom\binnt\wcc temp.c /p /fo=temp.i copy temp.i temp.ssl ..\dos4gw ..\compile temp.ssl rem The path in the following two lines should point to the Fallout 2 folder: md "c:\Program Files\BlackIsle\Fallout2\data\scripts" copy temp.int "c:\Program Files\BlackIsle\Fallout2\data\scripts\%1.int" del temp.c del temp.i del temp.ssl del temp.int This is for a Windows XP set up, which the compiler considers to be NT.. hence the "binnt" part.. It might be that you have to change the "binnt" part to just "bin" for other versions of windows.. The part that says "rem The path in the following two lines..." should be self explanatory. save it to the scripts folder, and then copy it to all of the sub folders..so each folder has it's own p.bat copy.. Now you need to put a command prompt ( that's a DOS window to all you youngsters out there.. ) shortcut into the scripts folder. Open the command prompt ( should show as "c:\Program Files\Black Isle\Fallout 2 Mapper\scripts>" ), and type "cd scriptfolder" where scriptfolder is the name of the folder where the script you want to compile is.. Type "p scriptname" where scriptname is the name of the script you want to compile ( minus the .ssl extension.. ). I'm assuming you have already made the changes you want to the script..? If you get any errors that say.. '..\dos4gw' is not recognized as an internal or external command, operable program or batch file. or something similar, you haven't changed to the "script you want to compile's" sub-directory ( ie ACBRAHMN.ssl should be compiled from the Arroyo directory ), and are trying to compile it from the scripts directory. If all went right, the there should me a brand new script in the "c:\Program Files\BlackIsle\Fallout2\data\scripts" folder ( unless you are re-compiling a script you already created there or put there from the dat's..) In order for NEW scripts to work, you need to add them to the scripts.lst file ( which you should extract from the master.dat file to the fallout2\data\scripts directory. ) Simply edit the .lst file in notepad, and add the name of your new script at the end of the list like the others in the list.. ATTENTION! Anything placed in the Fallout2\data directory and sub directories will not work if you have the patch000.dat installed, since the patch000.dat overrides the content of the Fallout2\data directories.. Which in this case would override the scripts.lst file.. Category:Fallout 2 tutorials - scripting